import Input from "@/components/Form/module/input";
import Select from "@/components/Form/module/select";
import DatePicker from "@/components/Form/module/datePicker";
import RadioGroup from '../module/radioGroup'
import Switch from '../module/switch'
import TreeSelect from "@/components/Form/module/treeSelect";


export const arrangeAssignment = (emit, config, params, hasEvent) => {
    if(config.type === 'input') return Input(config, params, emit, hasEvent)

    if(config.type === 'select') return Select(config, params, emit, hasEvent)

    if(config.type === 'datePicker' || config.type === 'date-picker') return DatePicker(config, params, emit, hasEvent)

    if(config.type === 'radioGroup' || config.type === 'radio-group') return RadioGroup(config, params, emit, hasEvent)

    if(config.type === 'switch') return Switch(config, params, emit, hasEvent)

    if(config.type === 'treeSelect') return TreeSelect(config, params, emit)
}
